package com.it.commicity.controller.sms;

import com.it.commicity.common.Result;
import com.it.commicity.service.sms.SmsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api")
public class SmsController {

    @Autowired
    SmsService smsService;

    /**
     * 发送手机验证码
     */
    @GetMapping("sys/getCode")
    public Result getCode(String phone) {
        System.out.println("SmsController->手机号是：" + phone);
        return smsService.getSMSCode(phone);
    }
}
